﻿using System;
using Microsoft.Xna.Framework;
using XnaPlus.Common.Extensions;

namespace FlipRunner.Physics
{
    public static class ConversionExtensions
    {
         public static Point GetPixelPosition(this IPhysicsComponent component, float pixelsPerMeter, int worldPixelHeight)
         {
             return component.Position.ToPixels(pixelsPerMeter, worldPixelHeight);
         }

         public static int MetersToPixels(this float meters, float pixelsPerMeter)
         {
             return (int)Math.Round(meters * pixelsPerMeter);
         }

         public static int MetersToPixels(this int meters, float pixelsPerMeter)
         {
             return (int)Math.Round(meters * pixelsPerMeter);
         }
    }
}